package com.zjut.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.zjut.domain.Model;
import com.zjut.domain.Questions;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface ModelServiceImpl {
    /**
     * 保存
     * @param model
     * @return
     */
    boolean save(Model model);

    /**
     * 修改
     * @param model
     * @return
     */
    boolean update(Model model);

    /**
     * 按id删除
     * @param id
     * @return
     */
    boolean delete(Integer id);

    /**
     * 按id查询
     * @param id
     * @return
     */
    Model getById(Integer id);

    /**
     * 查询全部
     * @return
     */
    List<Model> getAll();

    /**
     * 分页查询
     *
     * @return
     */
    IPage<Model> getPage(Integer currentPage, Integer pageSize, Model model);
}
